package com.skyolder.milkbee.service.dto;

import java.time.ZonedDateTime;
import java.io.Serializable;
import java.util.Objects;


/**
 * A DTO for the ExchangeRecord entity.
 */
public class ExchangeRecordDTO implements Serializable {

    private Long id;

    private Long wareId;

    private String name;

    private Integer cost;

    private Integer quantum;

    private ZonedDateTime createdAt;

    private ZonedDateTime modifiedAt;

    private Long userId;

    private Long leaguerId;

    private String schedule;

    private String history;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getWareId() {
        return wareId;
    }

    public void setWareId(Long wareId) {
        this.wareId = wareId;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Integer getCost() {
        return cost;
    }

    public void setCost(Integer cost) {
        this.cost = cost;
    }
    public Integer getQuantum() {
        return quantum;
    }

    public void setQuantum(Integer quantum) {
        this.quantum = quantum;
    }
    public ZonedDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(ZonedDateTime createdAt) {
        this.createdAt = createdAt;
    }
    public ZonedDateTime getModifiedAt() {
        return modifiedAt;
    }

    public void setModifiedAt(ZonedDateTime modifiedAt) {
        this.modifiedAt = modifiedAt;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Long getLeaguerId() {
        return leaguerId;
    }

    public void setLeaguerId(Long leaguerId) {
        this.leaguerId = leaguerId;
    }
    public String getSchedule() {
        return schedule;
    }

    public void setSchedule(String schedule) {
        this.schedule = schedule;
    }
    public String getHistory() {
        return history;
    }

    public void setHistory(String history) {
        this.history = history;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        ExchangeRecordDTO exchangeRecordDTO = (ExchangeRecordDTO) o;

        if ( ! Objects.equals(id, exchangeRecordDTO.id)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "ExchangeRecordDTO{" +
            "id=" + id +
            ", wareId='" + wareId + "'" +
            ", name='" + name + "'" +
            ", cost='" + cost + "'" +
            ", quantum='" + quantum + "'" +
            ", createdAt='" + createdAt + "'" +
            ", modifiedAt='" + modifiedAt + "'" +
            ", userId='" + userId + "'" +
            ", leaguerId='" + leaguerId + "'" +
            ", schedule='" + schedule + "'" +
            ", history='" + history + "'" +
            '}';
    }
    
    public static enum ScheduleState{
    	APPLY(1,"申请"),AGREE(2,"同意"),COMPLITE(3,"完成"),DENY(4,"拒绝");
    	private int _t;
    	private String _v;
    	private ScheduleState(int t,String v){
    		_t=t;
    		_v=v;
    	}
    	public int getState(){
    		return _t;
    	}
    	public String getValue(){
    		return _v;
    	}
    }
}
